#include<stdio.h>
int main ()
{
	int m;
	double cost;
	scanf("%d",&m);
	if(m<=50){
		cost=m*0.53;
	}
	else{
		cost=50*0.53+(m-50)*0.58;
	}
	if(m<=0){
		printf("Invalid Value!");
	}
	else{
		printf("cost = %.2f",cost);
	}
	return 0; 
}
